<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>授权管理</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi"/>
    <link rel="shortcut icon" href="/static/favicon.ico" type="image/x-icon"/>
    <link rel="stylesheet" href="/static/css/font.css">
    <link rel="stylesheet" href="/static/css/xadmin.css">
    <script type="text/javascript" charset="utf-8" src="/static/js/jquery-1.11.3.min.js"></script>
    <script src="/static/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="/static/js/xadmin.js"></script>
</head>

<body>
<div class="x-nav">
      <span class="layui-breadcrumb">
        <a href="/admin/welcomepage">首页</a>
       <a href="javascript:window.location.reload();">
          <cite>授权管理</cite>
        </a>
      </span>
    <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right"
       href="javascript:location.replace(location.href);" title="刷新">
        <i class="layui-icon" style="line-height:30px">ဂ</i></a>
</div>
<div class="x-body">
    <blockquote class="layui-elem-quote">
        提示:此处管理商户是否具有支付权限和支付时的提示信息(网站设置->校验授权->启用 后生效,可关闭该功能)以下信息每分钟从用户资料抓取一次,如有问题,请手动修改!
    </blockquote>
    <div class="layui-row">
        <form class="layui-form layui-col-md12 x-so" action="/admin/domain/list_admin" id="ajaxForm">
            <div class="layui-input-inline">
                <select name="status">
                    <option value="" <%if(status! == null){%>selected<%}%> >授权状态</option>
                    <option value="1" <%if(status! ==1){%>selected<%}%> >未授权</option>
                    <option value="2" <%if(status! ==2){%>selected<%}%> >已授权</option>
                </select>
            </div>            <div class="layui-input-inline">
            <select name="payShowInfo">
                <option value="" <%if(payShowInfo! == null){%>selected<%}%> >支付提示</option>
                <option value="1" <%if(payShowInfo! ==1){%>selected<%}%> >显示</option>
                <option value="2" <%if(payShowInfo! ==2){%>selected<%}%> >不显示</option>
            </select>
        </div>
            <input type="number" name="pid" placeholder="用户PID" autocomplete="off" value="${pid!}" class="layui-input">
            <input type="text" name="serach" placeholder="交易域名查询" autocomplete="off" value="${serach!}" class="layui-input">
            <button class="layui-btn" type="submit"><i class="layui-icon">&#xe615;</i></button>
        </form>
    </div>
    <xblock>
        <button class="layui-btn" onclick="x_admin_show('添加备案','/admin/domain/add')"><i class="layui-icon"></i>添加
        </button>
        <span class="x-right" style="line-height:40px">共有数据：${bean.totalNum!0} 条</span>
    </xblock>
    <div id="dewdewfef">
        <%#ajax pagenode:{%>
        <table class="layui-table">
            <thead>
            <tr>
                <th>ID</th>
                <th>交易域名</th>
                <th>用户</th>
                <th>用户PID</th>
                <th>状态</th>
                <th>提示</th>
                <th>修改时间</th>
                <th>操作</th>
            </thead>
            <tbody>
            <%for(o in bean.items!){%>
            <tr>
                <td>${o.id!}</td>
                <td>${o.serach!}</td>
                <td>${o.user!}</td>
                <td>${o.uid!}</td>
                <td><%if(o.status!1 ==1 ){%>未授权<%}else{%>已授权<%}%></td>
                <td><%if(o.payShowInfo!1 == 0 ){%>不显示<%}else{%>显示<%}%></td>
                <td>${o.optTime!,dateFormat='yyyy-MM-dd HH:mm:ss'}</td>
                <td class="td-manage">
                    <a title="详情" onclick="x_admin_show('详情','/admin/domain/view?id=${o.id!}')" href="javascript:void(0);">
                        <i class="layui-icon">&#xe63c;</i>
                    </a>
                    <a title="编辑" onclick="x_admin_show('编辑','/admin/domain/edit?id=${o.id!}')" href="javascript:void(0);">
                        <i class="layui-icon">&#xe642;</i>
                    </a>
                    <a title="删除" onclick="member_del(this,'${o.id!}')" href="javascript:void(0);">
                        <i class="layui-icon">&#xe640;</i>
                    </a>
                </td>
            </tr>
            <%}%>
            </tbody>
        </table>
        <div class="page">
            <%include("/include/page.html",{context:'dewdewfef',action:'/admin/domain/list_admin',model:bean!}){}%>
        </div>
        <script>
            $(function () {
                layui.use('laydate', function () {
                    var laydate = layui.laydate;
                    //执行一个laydate实例
                    laydate.render({
                        elem: '#start' //指定元素
                    });
                    //执行一个laydate实例
                    laydate.render({
                        elem: '#end' //指定元素
                    });
                });
            });

            function member_del(obj, id) {
                layer.confirm('确认要删除吗？', function (index) {
                    $.post("/admin/domain/delete",
                        {"id":id},
                        function (data) {
                            layer.msg(data.msg, {icon: 1, time: 800});
                            $(obj).parents("tr").remove();
                            window.location.reload();
                        },"json");
                });
            }
        </script>
        <%}%>
    </div>
</div>
</body>
</html>